/* GUI CONVERTED from rwwriq.p (converter v1.75) Sat Aug 12 23:18:37 2000 */
/* rwwriq.p - WORKCENTER ROUTING STANDARDS INQUIRY                      */
/* Copyright 1986-2002 QAD Inc., Carpinteria, CA, USA.                  */
/* All rights reserved worldwide.  This is an unpublished work.         */
/* web convert rwwriq.p (converter v1.00) Fri Oct 10 13:58:01 1997 */
/* web tag in rwwriq.p (converter v1.00) Mon Oct 06 14:18:41 1997 */
/*F0PN*/ /*K1JB*/ /*                                                    */
/*V8:ConvertMode=Report                                        */
/* REVISION: 2.0      LAST MODIFIED: 03/20/87   BY: EMB */
/* REVISION: 4.0      LAST MODIFIED: 02/24/88   BY: RL  *A171**/
/* REVISION: 4.0      LAST MODIFIED: 02/03/89   BY: flm *A328**/
/* REVISION: 7.3      LAST MODIFIED: 11/18/92   BY: jcd *G328**/
/* REVISION: 7.3      LAST MODIFIED: 08/28/94   BY: srk *GL73**/
/* REVISION: 8.6      LAST MODIFIED: 02/24/98   BY: *K1JB* Beena Mol    */
/* REVISION: 9.1      LAST MODIFIED: 03/24/00 BY: *N08T* Annasaheb Rahane */
/* REVISION: 9.1      LAST MODIFIED: 08/12/00 BY: *N0KP* myb              */

/*K1JB*/  /* DISPLAY TITLE */

/*GUI preprocessor directive settings */
&SCOPED-DEFINE PP_GUI_CONVERT_MODE REPORT

/*K1JB*/  {mfdtitle.i "b+ "}

          define variable wkctr like wcr_wkctr.
          define variable part like wcr_part.

/*K1JB*   /* DISPLAY TITLE */
 *          {mfdtitle.i "b+ "} */

          
/*GUI preprocessor Frame A define */
&SCOPED-DEFINE PP_FRAME_NAME A

FORM /*GUI*/ 
/*GL73*      wkctr */
/*GL73*/     
 RECT-FRAME       AT ROW 1 COLUMN 1.25
 RECT-FRAME-LABEL AT ROW 1 COLUMN 3 NO-LABEL VIEW-AS TEXT SIZE-PIXELS 1 BY 1
 SKIP(.1)  /*GUI*/
wkctr     colon 15
             wc_desc   no-label      skip
/*GL73*      part */
/*GL73*/     part      colon 15
             pt_desc1  no-label
          with frame a side-labels  width 80 attr-space NO-BOX THREE-D /*GUI*/.

 DEFINE VARIABLE F-a-title AS CHARACTER INITIAL "".
 RECT-FRAME-LABEL:SCREEN-VALUE in frame a = F-a-title.
 RECT-FRAME-LABEL:HIDDEN in frame a = yes.
 RECT-FRAME:HEIGHT-PIXELS in frame a =
  FRAME a:HEIGHT-PIXELS - RECT-FRAME:Y in frame a - 2.
 RECT-FRAME:WIDTH-CHARS IN FRAME a = FRAME a:WIDTH-CHARS - .5.  /*GUI*/

/*GUI preprocessor Frame A undefine */
&UNDEFINE PP_FRAME_NAME



          /* SET EXTERNAL LABELS */
          setFrameLabels(frame a:handle).

/*K1JB*/  {wbrp01.i}

          repeat with frame a:

/*K1JB*/ if c-application-mode <> 'web' then
    update wkctr part with frame a editing:

      if frame-field = "wkctr" then do:
     /* FIND NEXT/PREVIOUS RECORD */
     {mfnp.i wcr_route wkctr wcr_wkctr wkctr wcr_wkctr wcr_route}

     if recno <> ? then do with frame a:
        find wc_mstr where wc_wkctr = wcr_wkctr and wc_mch = wcr_mch
        no-lock no-error.
        display wcr_wkctr @ wkctr.
        if available wc_mstr then display wc_desc.
        else display " " @ wc_desc.
        recno = ?.
     end.
      end.
      if frame-field = "part" then do:

     /* FIND NEXT/PREVIOUS RECORD */
     if wkctr > "" then do:
        {mfnp01.i wcr_route part wcr_part wkctr wcr_wkctr wcr_route}
     end.
     else do:
        {mfnp.i wcr_route part wcr_part part wcr_part wcr_part}
     end.

     if recno <> ? then do with frame a:
        find pt_mstr where pt_part = wcr_part no-lock no-error.
        display wcr_part @ part.
        if available pt_mstr then display pt_desc1.
        else display " " @ pt_desc1.
        recno = ?.
     end.
      end.
   end.
   status input.

/*K1JB*/ {wbrp06.i &command = update &fields = "  wkctr part" &frm = "a"}

/*K1JB*/ if (c-application-mode <> 'web') or
/*K1JB*/ (c-application-mode = 'web' and
/*K1JB*/ (c-web-request begins 'data')) then do:

   find first wc_mstr where wc_wkctr = wkctr no-lock no-error.
   find pt_mstr where pt_part = part no-lock no-error.
   if available wc_mstr then display wc_desc.
   else display " " @ wc_desc.
   if available pt_mstr then display pt_desc1.
   else display " " @ pt_desc1.

   hide frame b.
   hide frame d.

/*K1JB*/ end.

   /* SELECT PRINTER */
   {mfselprt.i "terminal" 80}
/*GUI*/ RECT-FRAME:HEIGHT-PIXELS in frame a = FRAME a:HEIGHT-PIXELS - RECT-FRAME:Y in frame a - 2.


   if wkctr > "" then do:
      for each wcr_route where wcr_wkctr = wkctr and (wcr_part = part
      or part = "") no-lock use-index wcr_route with frame b width 80:
     find wc_mstr where wc_wkctr = wkctr and wc_mch = wcr_mch no-lock
     no-error.
     /* SET EXTERNAL LABELS */
     setFrameLabels(frame b:handle).
     display wcr_wkctr wcr_mch WITH STREAM-IO /*GUI*/ .
     if available wc_mstr then display wc_desc format "X(20)" WITH STREAM-IO /*GUI*/ .
     display wcr_part wcr_op wcr_rate WITH STREAM-IO /*GUI*/ .
     
/*GUI*/ {mfguichk.i } /*Replace mfrpchk*/
                        /*G328*/
      end.
   end.
   else do:
      for each wcr_route where wcr_part >= part no-lock
     with frame d  width 80 no-attr-space:
     find pt_mstr  where pt_part = wcr_part no-lock no-error.
        /* SET EXTERNAL LABELS */
        setFrameLabels(frame d:handle).
        display
        wcr_part WITH STREAM-IO /*GUI*/ .
        if available pt_mstr then display pt_desc1 format "X(20)" WITH STREAM-IO /*GUI*/ .
        display wcr_wkctr wcr_mch wcr_op
        wcr_rate WITH STREAM-IO /*GUI*/ .
        
/*GUI*/ {mfguichk.i } /*Replace mfrpchk*/
                     /*G328*/
      end.
   end.

   {mfreset.i}
/*GUI*/ {mfgrptrm.i} /*Report-to-Window*/
                          /*G328*/
   {mfmsg.i 8 1}
/*     output close. *G328*/

end.

/*K1JB*/ {wbrp04.i &frame-spec = a}
